using System;
using System.Collections.Generic;
using System.Text;
using Sedna.Domain;

namespace Sedna.Core.Persistence
{
    /// <summary>
    /// Creates <see cref="Time"/> object from milliseconds.
    /// </summary>
    public class TimeMilliType : TimeType
    {
        protected override Time CreateObject(int value)
        {
            return Time.CreateFromMilliseconds(value);
        }

        protected override int GetValue(Time time)
        {
            return time.TotalMilliseconds;
        }
    }
}
